<?php

		/*** EMAIL NOTIFICATION (experimental) ***
		* email_notify.php
		* Author: David Reilly
		*
		* before you invoke the script, you will need:
				a running instance of PinSQL
				a $touser variable
				
				a $subject				
				a $messageEmail variable
		***/
		
		$email_notify = $pinSQL->GetUserdataField($touser, "email_notify");

		if ($email_notify)
		{
			$to = $pinSQL->GetUserField($touser, "email");	
			$headers = 'From: notify@pinproject.com' . "\r\n" .
				'Reply-To: notify@pinproject.com' . "\r\n" .
			    'X-Mailer: PHP/' . phpversion();
			error_reporting(0);
			mail($to, $subject, $messageEmail, $headers);	
			error_reporting(1);
		}
//_______________________
		
?>